home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01a.txt / 000007_icon-group-sender _Wed May 17 07:40:12 2000.msg < prev    next >
Internet Message Format  |  2002-01-03  |  5KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id HAA00581
  4.     for icon-group-addresses; Wed, 17 May 2000 07:39:57 -0700 (MST)
  5. Message-Id: <200005171439.HAA00581@baskerville.CS.Arizona.EDU>
  6. From: "Ian Trudel" <ian.trudel@tr.cgocable.ca>
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Re: Is Anyone Working On A Unicode Version Of Icon?
  9. X-Priority: 3
  10. X-MSMail-Priority: Normal
  11. X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
  12. X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
  13. Date: Wed, 17 May 2000 02:32:35 GMT
  14. X-Complaints-To: abuse@cgocable.ca
  15. X-Trace: carnaval.risq.qc.ca 958530755 24.226.208.172 (Tue, 16 May 2000 22:32:35 EDT)
  16. To: icon-group@optima.CS.Arizona.EDU
  17. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  18. Status: RO
  19. Content-Length: 4406
  20.  
  21. Hello Frank,
  22.  
  23.     really interesting comments here.
  24.  
  25. > I would agree that it is much easier to add a new primitive type to the
  26. Java
  27. > implementation of Icon, as opposed to the C implementation. In either
  28. case,
  29. > however, adding a new primitive type involves coding in a language other
  30. > than Icon. Ideally, it would be nice to be able to write a new type, along
  31. > with its associated primitive operations, in Icon.
  32.  
  33. Yes, but there are many factors that may not be in favor of doing primitive
  34. types in Icon. Speed issue may be a problem. Or when the primitive uses
  35. system depend things, such as sockets or some database API. Yet, the spirit
  36. of Icon is not "everything should be made in Icon" such as Smalltalk
  37. communities. Icon is not even bootstrapped. This latter made me surprised,
  38. Icon is so powerful and his text processing feature would just let anyone
  39. write good, complete and yet understandable compiler/interpreter!
  40.  
  41. > Currently, Icon permits one to define a new type with a record
  42. declaration,
  43. > such as
  44. >
  45. >     record Unicode_cset( ... )
  46. >
  47. > A programmer can then define procedures for the new record type. A record
  48. > type, however, fails to extend the set of primitive types, for the
  49. following
  50. > reasons:
  51. >
  52. > 1.    You cannot (re)define the primitive operators, such as "*", "++", or
  53. > "<<", for a record type;
  54. > 2.    You cannot define implicit /explicit type conversions between a
  55. record
  56. > type and the existing types; and
  57. > 3.    You cannot define the behaviour of functions such as image and write
  58. > for the new record type.
  59.  
  60. Good points here. I'm not sure it should be part of Icon programming
  61. language though. It appears much more like "object orientation" than the old
  62. procedural language style. (BTW, is it a feature of Idol? I never used it..)
  63.  
  64. To be honest, I'm not sure if it's a good idea to have primitive data type
  65. ability at Icon's level. Primitive should be a limited resource. It would
  66. also require much more work and I have no idea on the position of Icon
  67. Project Group. Yet my intend is not to go against their vision and I do not
  68. want to start a new dialect.
  69.  
  70. > Now imagine that we modify Icon so that we could define operators, type
  71. > conversions, etc. for user-defined Icon types. Would this give us a
  72. > "pluggable" capability, similar to Squeak?
  73.  
  74. Not exactly, but it'd be impressive as well. Actually, Squeak and Icon are
  75. different in their nature. Squeak is a Smalltalk dialect. Smalltalk is a
  76. pure object-oriented programming environment/language. Icon is not an
  77. environment nor OO. Smalltalk is also bootstrapped. Smalltalk is written in
  78. Smalltalk. Usually, the virtual machine is not in Smalltalk though. But here
  79. comes Squeak, they're cheating!! The Squeak virtual machine is written in
  80. Slang, a Smalltalk subset, and debugged under Squeak environment! It's just
  81. awesome.. but it does not end here, because Squeak generate portable C code.
  82. Did you guess? Yes, they're generating the virtual machine in C code and
  83. compile it for virtually any plateforms!
  84.  
  85. Enough of Squeak/Smalltalk, let's talk about Icon again. Yes, that'd be nice
  86. to write primitive in Icon. If we had a dynamic primitive data types system.
  87. And no, we wouldn't have to change Icon's implementation for being able to
  88. write primitive in Icon. Why? As I said earlier, Icon's text processing
  89. features could just be great for compiler things. We could write a Icon to C
  90. generator. I've seen a little thing provided with Icon (icn2c.icn, I think),
  91. would not be too hard to extend it or rewriting it for that purpose.
  92. Primitives could still be written in the old C way as well..
  93.  
  94. Anyway, I think adding dynamic primitive data type system would be valuable
  95. at all points. IMHO, it'd be also acceptable for Icon Project Group, because
  96. it doesn't require to change everything in their actual implementation. I
  97. know they strive for some ultime stability and portability, which is great!
  98. On the other hand, that would allow a faster evolution of Icon without
  99. changing the base system, the work of Icon Project Group. Plus, if someone
  100. like me does a new primitive data type and Icon Project Group likes it, this
  101. could be easily integrated to the next release.. without redownloading the
  102. whole Icon or even recompiling Icon *mega grin*.
  103.  
  104. PS: It'd be also nice to bootstrap Icon. Ok, ok, there's enough work to do
  105. yet. ::))
  106.  
  107. --
  108. Ian Trudel, aka BackOrder
  109. StarTrip Server Administrator
  110. http://startrip.gene6.com/
  111.  
  112.  
  113.